package auto;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class SendKeyCommand implements Command {
    private final String elementLocation;
    private final String content;

    public SendKeyCommand(String elementLocation, String content) {
        this.elementLocation = elementLocation;
        this.content = content;
    }

    @Override
    public void run(WebDriver driver) {
        driver.findElement(new By.ByCssSelector(elementLocation)).sendKeys(content);

    }
}
